Material UI
強み
色等変えたい
code:thema.js
import { createMuiTheme } from '@material-ui/core/styles'
const theme = createMuiTheme({
typography: {
useNextVariants: true,
},
palette: {
primary: {
light: '#5c67a3',
main: '#3f4771',
dark: '#2e355b',
contrastText: '#fff',
},
secondary: {
light: '#ff79b0',
main: '#ff4081',
dark: '#c60055',
contrastText: '#000',
}
}
})
導入
code:App.js
import React from 'react'
import MainRouter from './MainRouter'
import {BrowserRouter} from 'react-router-dom'
import { ThemeProvider } from '@material-ui/styles'
import theme from './theme'
const App = () => {
return (
<BrowserRouter>
//挟む
<ThemeProvider theme={theme}>
<MainRouter/>
</ThemeProvider>
</BrowserRouter>
)}